<div class="row animated" ng-class="{true: 'fadeInRight', false:'fadeInLeft'}[currentAnimated]">
  <div class="panel panel-default">
    <div class="panel-heading">
      <a ng-click="discard()" href="javascript:;"><i class="backBtn fa fa-arrow-circle-left"></i></a>
      <span class="panelTitle" ng-bind="Form.title"></span>
    </div>
    <div class="panel-body">
      <form novalidate name="form" class="form-horizontal" role="form">
        <div class="form-group" ng-class="{'has-error': form.title.$invalid && form.title.$dirty}">
          <label class="control-label col-xs-3 col-md-2">栏目名称：</label>
          <div class=" col-xs-7 col-md-8">
            <input type="text" class="form-control w50c" name="title" placeholder="栏目名称" ng-model="channel.title" required>
          </div>
          <div class="col-xs-2 col-md-2" ng-show="form.title.$dirty && form.title.$invalid">
            <span class="text-danger" ng-show="form.title.$error.required">请输入栏目名称</span>
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': form.pageSize.$invalid && form.pageSize.$dirty}">
          <label class="control-label col-xs-3 col-md-2">显示记录数：</label>
          <div class=" col-xs-7 col-md-8">
            <input type="number" class="form-control w25c" name="pageSize" placeholder="显示记录数" ng-model="channel.pageSize" required>
          </div>
          <div class="col-xs-2 col-md-2" ng-show="form.pageSize.$dirty && form.pageSize.$invalid">
            <span class="text-danger" ng-show="form.pageSize.$error.required">请输入显示记录数</span>
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': form.sort.$invalid && form.sort.$dirty}">
          <label class="col-xs-3 col-md-2 control-label">排序值：</label>
          <div class="col-xs-7 col-md-8">
            <input type="number" name="sort" class="form-control w25c" placeholder="排序值" ng-model="channel.sort">
          </div>
          <div class="col-xs-2 col-md-2" ng-show="form.sort.$dirty && form.sort.$invalid">
            <span class="text-danger" ng-show="form.sort.$error.required">请输入排序值</span>
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': form.description.$invalid && form.description.$dirty}">
          <label class="col-xs-3 col-md-2 control-label">栏目描述：</label>
          <div class="col-xs-7 col-md-8">
            <input type="text" name="description" class="form-control w50c" placeholder="栏目描述" ng-model="channel.description">
          </div>
          <div class="col-xs-2 col-md-2" ng-show="form.description.$dirty && form.description.$invalid">
            <span class="text-danger" ng-show="form.description.$error.required">请输入栏目描述</span>
          </div>
        </div>
        <div class="form-group">
          <div class="col-xs-4 col-xs-offset-2">
            <button class="btn btn-primary" ng-click="submitForm()" ng-disabled="form.$invalid">保存</button>
            <button class="btn btn-white" ng-click="discard()">取消</button>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>